package com.gexiaobao.pigeon.ui.dialog

import android.annotation.SuppressLint
import android.content.Context
import android.view.LayoutInflater
import androidx.appcompat.widget.AppCompatTextView
import com.gexiaobao.pigeon.R

/**
 * @author:hxw
 * @date  :2022/12/8
 * @desc  :
 */
class PairCountDownDialog(context: Context?) : RxDialog(context!!) {

    private lateinit var tvCountDownTime: AppCompatTextView

    init {
        initView()
    }

    @SuppressLint("MissingInflatedId")
    private fun initView() {
        val dialogView = LayoutInflater.from(context).inflate(R.layout.dialog_to_pair_count_down, null)
        tvCountDownTime = dialogView.findViewById(R.id.tv_count_down_time)

        setContentView(dialogView)
    }

    fun setCountDownTime(time: Int) {
        if (time.toString().isNotEmpty()) {
            tvCountDownTime.text = time.toString()
        }
    }
}